Motion.SetAxisGear method
Commands a ratio between the velocity of the slave and master axis.
Namespace: IntervalZero.KINGSTAR.OpcUa.Api
Assembly: IntervalZero.KINGSTAR.OpcUa.Api (in IntervalZero.KINGSTAR.OpcUa.Client.dll) Version: 4.4.0.0
Syntax
public KsCommandStatus SetAxisGear(
int Master,
int Slave,
bool Permanent,
double Ratio,
McSource MasterValueSource,
double Acceleration,
double Deceleration,
double Jerk,
McBufferMode BufferMode
)
Public Function SetAxisGear(
Master As Integer,
Slave As Integer,
Permanent As Boolean,
Ratio As Double,
MasterValueSource As McSource,
Acceleration As Double,
Deceleration As Double,
Jerk As Double,
BufferMode As McBufferMode
) As KsCommandStatus
Parameters
Master [in]
Type: int
The index of the master axis. Indexes are zero based. Aliases affect this parameter.
Slave [in]
Type: int
The index of the slave axis. Indexes are zero based. Aliases affect this parameter. The number of slaves is up to 32.
Permanent [in]
Type: bool
Determines whether the gear state is preserved after the motor is disabled.
true: the gear state is preserved even if the motor is disabled. For example, if the master axis is enabled, the slave axis will be enabled. If an error has occurred on the master, it occurred on the slave too.
false: the gear state won't be preserved after the motor is disabled.
Ratio [in]
Type: double
The gear ratio.
MasterValueSource [in]
Type: McSource
Defines the source for synchronization.
- mcSetValue – synchronization on master set value. We suggest you use these settings.
- mcActualValue – synchronization on master actual value. This setting may not be stable.
- mcSecondEncoderValue – actual value of the secondary encoder of the axis.
NOTE: mcSecondEncoderValue is not supported yet.
Acceleration [in]
Type: double
The acceleration for gearing in.
Deceleration [in]
Type: double
The deceleration for gearing in.
Jerk [in]
Type: double
The jerk for gearing in.
BufferMode [in]
Type: McBufferMode
Defines how to blend the velocity of two methods.
Return value
Type: KsCommandStatus
Returns the KsCommandStatus class.
Remarks
- The slave ramps up to the ratio of the master velocity and locks in when this is reached. Any lost distance during synchronization is not caught up.
- The gearing ratio can be changed while SetAxisGear is running, using a consecutive SetAxisGear function without the necessity to Motion.ReleaseAxis first.
- After being "InSync," a position locking or just a velocity locking is system-specific.
- To detach the slave axis, use ReleaseAxis.
Examples
N/A
See also